Write a custom CUDA kernel to optimize the `Gumbel PDF` as an activation function.

Formula: f(x) = exp(-(x + exp(-x)))

Problem Analysis:
1. Computationally Intensive: This operation involves a double exponential, making it arithmetically heavy.
2. Memory Bottleneck: A standard PyTorch implementation `torch.exp(-(x + torch.exp(-x)))` chains multiple kernels, creating intermediate tensors and high memory traffic.
3. Numerical Stability: The inner `exp(-x)` can overflow if `x` is a large negative number.

Optimization Strategy: Fused Element-wise Kernel with Vectorization

1. One-Thread-per-Element: Map each element to a CUDA thread.

2. Vectorized Loads (float4): Use `float4` to process 128 bits per memory transaction.

3. Fused Stable Math:
   - For each element `x`, first compute `inner_val = -x`.
   - Clamp `inner_val` to a safe upper bound (e.g., 80.0) to prevent `exp` overflow.
   - Compute `exp1 = __expf(clamped_inner_val)`.
   - Compute `result = __expf(-(x + exp1))`.
   - All steps are fused in registers.

4. One-Pass: Fuse all logic into a single read-compute-write kernel.
  
Here's an example to show you the syntax of inline embedding custom CUDA operators in torch: The example given architecture is:   
  
```python
import torch
import torch.nn as nn

BATCH_SIZE = 4096
HIDDEN_DIM = 4096
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

class GumbelPDF(nn.Module):
    """
    Gumbel Probability Density Function (PDF).
    f(x) = exp(-(x + exp(-x)))
    """
    def __init__(self, clamp_val=80.0):
        super(GumbelPDF, self).__init__()
        self.clamp_val = clamp_val

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        neg_x = torch.clamp(-x, max=self.clamp_val)
        inner_exp = torch.exp(neg_x)
        return torch.exp(-(x + inner_exp))

class Model(nn.Module):
    def __init__(self):
        super(Model, self).__init__()
        self.act = GumbelPDF()
    
    def forward(self, x):
        return self.act(x)

def get_inputs():
    input_tensor = torch.randn(SHAPE, dtype=torch.float32) * 20.0
    return [input_tensor.contiguous()]

def get_init_inputs():
    return []